Yes, Karen.
OK, so we are going to look at Jennison today.
So it's a garani and it's your city by mistake, mutal.
OK, OK, OK, no, I'm not.
Where you going?
All right, all right.
So I was saying we are going to look at how to bid to knit our content topic number 23 in the beginner
topics.
And this is a kind of a complicated topic, so I'll try to move faster.
So that we can see how much we can cover, but if you feel like you are getting lost along the way,
you can just you can just make yourself hard so that you can ask your questions and you're able to move
on.
Excellent.
So can you open the share your screen and just highlight the topic?
Oh, OK.
I was going to be highlighting here so my skin was insured.
So year you use the Windows.
I use Linux on the trainings.
I use Linux.
You remember this is the installation I'm using is local and that's why is that he's not a smart enough
to understand that you are you are still didn't care what screen.
Yes, he's all right.
Yeah, great.
So this is the topic number 23, incrementing content pagination.
OK, see, in 20 years.
Let's jump into it, we are going to be reading the articles that we have here.
I think we can start by renaming this to our articles.
Remember the last time we saw these articles from our database?
They are I think they are on 16 or 18.
They are 18 of them.
So in these two articles.
And so be able to see where exactly they are and the reason why we can do this.
Imagine that you have a database that has even a hundred items, even one hundred and a hundred.
This is very little.
Some databases will go to for some databases for just some ordinary software, somebody that knows tons
of records, others or even go to millions.
So even if you had one hundred only in the database, this would be one hundred rules or anybody that
is rerolls going down.
So that would make you a system one slow.
And number two, it would it would be I do not be a good user experience using a system that just keeps
crawling, scrolling on items here.
So we are going to see out opportunities, content, such a way that the users will be able to see maybe
the first three and then they can go to the next page through the next three, the next page and say
something like that.
That is done in almost all the systems that we have used, we have used in our life.
So let me first of all, reading this, I want to make this a larger.
I like the very small font, so I like with small ones.
It's not good for your eyes.
By the way.
I normally I'm normally very comfortable with that, not that we know.
Yeah, so our name is to.
And records may be available articles.
Readable articles and expecting to change to available articles.
Yes, so we want to change these attitudes, the three items per page, and that is what you are going
to be doing now.
So this is our this is the list of our articles.
Like I said, I think they are both 18 and they are not the number of things that I want to do.
Even before we start writing Amarcord, let me let me exit this.
I was doing some some graphics here earlier.
And then we do we do bench bench console.
We do bench console.
But before I do you remember this, this is a function that I introduced last time called Get DECT.
And what normally happens when we have pagination in content is like we have SLAs and then a question
mark and then we have something like page equals five.
So we have something like this when we have a big decision in a Web application.
So how do we implement this this page?
How do we pass it to how do we pass this page to our to our python code so that we are able to process
a Derechos that we want to retrieve.
And you remember we had formed what I mean for people from the last time, and I can just go here and
do print so that you can see this.
And I will say print Frappier.
Tort reform, and that's correct, and yeah, let me see what is in there, in there and maybe I can
I can give it some speed so that you see it's printing.
So he it, you know, do one, two, three.
You mean on to.
Is listed here.
And then I do two more and then this is a formatted stream, and I thought if I if I if I run my code
now, this is an index to me and I want to run my front page with this quote here.
And then the next thing that they have done is that I have passed this page.
Let me, first of all, remove it and we see what we have.
So I'm expecting to see something on the Tamino here that is running late mimic estrogen.
Also.
And.
Yes, let me clear this up and start.
So I'll go ahead and reload my page without without I have not passed any parameter here.
So what happens?
You see, this one has us logged something here, just an empty object.
So this object, this object is coming from this robillard form dict that we have here.
So what if we had something like page equals five and we went ahead and loaded our page here you see
something like this.
So we have page five.
So if we had something else like page is five and maybe which equals these are just some of the some
things is 60, something like that, then I run it again here expecting to see two items.
And yes, we have pages five.
Each is 60.
So these items have already been passed to our code.
So remember, as we move along, this Rapido form dict is used to get items that have been passed up
here as parameters and then they are passed to our function here for processing.
So put that in mind as we move along.
And then the next thing that you're going to do is to see how we can run a query that is going to get
all our affidavits, that all our articles from the database.
So here you are going to be using the you can either use rescuable.
That is you can you can just decide it here.
You may be there for.
And also you can decide to use Bench Maria to be this will be someone you can write your appearance
here or we can decide to go with or we can decide to go with the Business Council instead of this or
whichever you comfortable with, just to see which way you need to meet to get to get to the items that
that you want from the.
If I come here, for instance, I can do something like select committee.
I will need to name this one from getting them from my from my article right here.
Maybe I can customize to see the columns.
So I'll get the name is the primary kirino get some of the few others here, so I'll select the name
and then I'll do what the article name I think.
And then they have all the and then I have I guess be in.
And then I have a.
Compost.
And then I can do something from there.
This one has our space, so we have to do that when we have prob it's not that at the school library.
So we can do that and see what we get.
So what do we need to pass that?
So we have we have a number, you see the articles that we have here, these are all datin and this
one has returned and this one has returned all over the columns that we have selected.
So what if we wanted maybe to be meeting all this content and just quit and our endless code again?
But this time I want to limit my limit.
That's what I don't forget it.
I want to limit my query.
If I make this small, I don't know whether you will be able to see like that are able to see that.
Yes, is it reasonable?
OK, so limit the three.
Let me say limit three you we have gotten the fastest three.
This is very, very important what we are doing here.
So we have day one the day the retest hook.
Then they retest to reach that the first three items.
These are the first three items that we have retrieved with this.
Now, note that if I do that and then I add zero commentary here, that is, I repeat, zero comma three,
I'm supposed to get the same results like I had up here.
So I have the I have the same same results.
So what this query does, because this is the query we are going to be using, first of all, show you
if I do here now, very common.
Three, let's see what we are going to get.
We have video items, but this one has that this one piece 58, this 60, the test article.
So those are three still, but they are starting from a different in index.
Now, look at our look at the query.
We didn't give it all items.
The first three are ending at which that those are the ones we have here.
It is with Rich that and then we have the next resulting from this 58, the ones that I have highlighted
there, so that's 50, 60 and then test article.
These are the ones that we have here.
So these ones have been returned by this limitedly comma three.
This one, it was written by zero comma three.
So what this does is this facility here is used as the index.
The video that I am highlighting here is you saw the index and then the second three is used as the
number of items that you want.
So this one is telling it.
Let me start with this one.
This one is letting this thing go to the database and then get me three items and start from index to
zero or go to the database so that from index zero and get me three items.
This one is telling the system, go to the database, start from index three and get three.
The items.
Remember, when you have this one here, this is index one.
Index the index zero.
One, two, three.
So remember, this one starts from index zero.
So the first one is zero.
This is one.
This is two.
And then this is three.
So if we went here and read the same code again by this thing, we do need to start from six to eight,
would start from the exits and get me three items.
If you run that code, you're going to get from test,
test, test, test.
And then one is the wind and then think and grow rich.
So these are started from index number six and it really has three items.
So remember, this is this quote is going to be very important when we are doing pagination for our
content now.
And that's it.
You will need it now to explore this code more so that you see.
Are you going to apply it in other things?
In our case today, I want us to write a function now that is going to use it to pay our content.
And the display on our page here, the number of items down here that we need.
And you're going to be displaying three items per page so you can decide to write this as a tell.
That is what you are going to do.
We are going to write it in the file.
You can decide to put it in another file.
Maybe you have decided you have put it your own utils file so you can just go ahead and put it there
for us to be.
We are going to put it in our index file and then we are going to import it here and they're going to
use it to get the articles that are pegylated.
So let's go ahead and say define we can call this function, you can call this function, whatever you
like to call it.
I'm going to be calling us today something like it.
And then with this function is going to begin to.
Parameters, the first parameter is the duct tape, and the reason why I want us to do it this way is
because you may decide, you know, presentation is not something that you're going to do only in one
one DOCTYPE.
You may need to be doing it, maybe all your doctor names or maybe even if you need to be doing it.
Only to the best thing to do here is to write on util that you are going to call and then you pass the
data and then it is going to do that for you.
So this DOCTYPE in our case today is going to be the article library DOCTYPE and then the next item
you are going to be passing is the page and by default we are going to pass out.
The page is starting at zero, so everything is going to start at zero.
So remember when we are here, when are here, look at this query that we are in here.
We have select all those from our Thibeault limit, then we have to to start from index to zero all
the way to and get us the items.
So in our code, this index is going to be passed as the page.
So we are going to pass a page here and that is what we are going to use to get the articles that we
want to get.
So the tape and then pass the page.
Remember to get the page to start from index zero and then every time you have pegylated content.
You have the previous and the next buttons, so we can go ahead and see previous the next.
Next equals and you're going to say previous and next I'm going to start from zero zero.
So that's what we have done here is just like seeing equals zero and next equal to zero.
So this one is an equivalent of this.
So whichever you're comfortable with, it's OK.
But this one is neat and as fewer characters.
So it's up to you to select that.
And then the next thing that we need to do here, because we are going to be writing a dynamic, a dynamic.
We're here, we may have some things, queries that have conditions, for example, is you may come
here and say, I want to pass parameters, select whatever from our table where we are X, Y, Z, so
that we're X, Y, Z is a condition.
So the query we want to write here, because it is going to be a very dynamic one.
Remember, we have a dynamic DOCTYPE we may need to pass in some conditions so we can define another
variable here in the passing conditions and these conditions you are going to pass in an empty string
for now.
Only that space and then we can go ahead and now write our query so we can see where it was, then go
ahead and write about where we can pick it from our console here.
So we are going to say we are going to pick this one.
We may not need not the limit.
The limit is going to have to come from another function, from another another place.
So let me copy this robot here and then here I'm going to pass in a formatted string.
Thirty six of them, and then I passed that.
Microsoft, so that all these items from our article now look here we have passed.
We have Buster Hardcoded article brought here and we are passing in our DOCTYPE here, so we do not
need to do this so we can remove this and replace it with our dog.
This is the duct tape that we passed as a parameter here.
So this is going to receive a parameter and is going to proceed with our with our with running our query.
And then this is from people that we are you remember to do these conditions.
Let me scroll a little bit.
These conditions are.
It was ABC, so we can also pass this one here as conditions, so if there are any conditions, they're
going to be passed here and then that quote is complete.
That is that is that security now is going to be receiving dynamic data and is going to be running or
whatever it is, it has been instructed to run.
And then the next thing that we are required to do here is to check if apage we are passerby's here,
not we have when we have a page, we can see if page.
His function checks if this page this function checks, if this page exists, by this I mean when you
come to the browser here, I mean, first of all, remove age.
You see here you be passing a page item or a parameter code page.
So when I run this function.
Now this one has pages.
So this one will be written through.
It has a speech.
Now, if it is not there, like, for instance, is our homepage just the homepage?
This is not going to have peace.
So this is what the condition we are taking here using each page.
That means if the hassabis, we are supposed to run some code here.
So first of all, let me pass, because if you want to read some quite some amount of logic or if we
don't have that page.
We can see what else and then we are going to write write our condition here.
We can see the funding that we need to do.
That is if we do not have a beach, that is for the kids of our home beach.
So we have not passed any peace here.
We have not we don't have any sort of funding that we want to do and we don't have a beach is count
the number of items or the number of articles that we have here.
So we don't want like we said, when you are starting, we don't want to display 100 items on this on
this page because it would be a bad experience for the users.
So the first thing is to check how many articles do I have so I can just do a body count.
You can call it whatever you call it.
And then I'm going to say equals this again, you can test it on your post also that you have a lot
of issues surrounding this so we can go back here.
Let me just create this week, then a clear and then a double edged sword.
I'm hopeful that the.
You're not comfortable using birth control and stuff like that, it's just like I put it, on sale so
we can do we can do Covenant Records and then we pass therapy, not repeat, not ask you.
Well, and then here we are going to run our query.
So we are going to do one, two, three, one, two, three.
We are going to do select.
A select and then we do account and we want to count.
You can count whatever and then we can do us even count into account and then we need to pass out from
the people you want to count from is our tab.
Typical.
LaBron.
What we have schools in Texas, an era is what we have silicones name comes from article library.
Oh, let me see what we have here at the library is quoted, OK, me see whether this is what I need.
It makes it here.
BMI console, then console again, and I ran that, I have an issue to you, so you have an error.
Silicones.
Oh, I wrote, I suspect not select, so this is not supposed to be to say it is supposed to be select,
so I have it there.
And then if I do count, you see this one is returning that.
So we have about ten items in our database.
So what if we wanted to return an object we can do.
We can do this here.
We remember you are doing us and our school because it was true.
So if I are going to count now, I have a count in 14.
So I have this one now with returning my number of the number of items I have in my in my database so
I can go ahead now.
And and before we do that, we want only to return the number so we do not need it, not need an object.
So we can do because this is a this is an array and you know that arrays start from index zero.
So definitely this is an array of objects and therefore this object is at index zero.
So I can go ahead and do zero if I do that.
And then I look at my area again, I have this I have that note that if I do this without selecting
the index of the array, I get an array of objects.
So the first object is count that in.
If I say that I only wanted the first item in the array, I only get an object.
This is not an array of objects.
This is that.
This is the first object.
And then if I do that, then I do.
So I want only to get this site and hear those comments into and then I look at what I have here, I
have counted 14.
So this is what we need.
We can go ahead and copy this.
Copy this as it is.
Copy it and then I bring it to my code here and I ask is.
So here we have four appear to be select all that as count now remember that this duct tape, we are
passing it dynamically so we do not need to have it.
Had to put it.
Yes, we can remove that.
And then I pass duct tape.
And then when you do that, remember that this is supposed to be a formatted string python three, so
that if you understand what you mean by passing this this other item inside here, so that is done,
we are done with that.
The next thing that we need to do now, this is checking the number of this is getting for you the number
of items that are in the table of the duct tape that you are trying to work with.
And therefore, we are going to see the next thing is to check the condition.
And so we can see if count is greater than three.
Remember, we want to we want to present our content with the items.
So if count equals three, what are we supposed to do here?
We're going to set our previous.
And previous and next pages, and these are going to be set, by my count, is greater than three,
that means we have more than three items in our database.
So we can do previously just zero.
And the next page is supposed to be two.
Why are we seeing two and not one?
Because we are at right now and we load our page.
We are at index one.
They the page that you're going to read first is the first page.
So if you want to go to the next page, that will be page two.
If you want to go to the previous page, that is supposed to be PGC.
So if my account has more than three items or three articles in our case, then say to this.
Else, what are we supposed to do, not means because it means we do not have more than three items
and therefore we can just simply pass.
So this we don't need to process anything there.
Guys, go ahead and display the content as it is.
And then after that, the next thing we going to do is not to assign our articles.
So articles, we are not going to run a query that is going to get our articles.
So when we have we we don't have more than three items is going to jump into this when we have more
than the items is going to, first of all, set this and then it's going to jump into our database for
the articles so we can go ahead and do Frappier.
To be told Escuela.
Then the query want to run here, remember you wrote this is the query, so I can copy this and pass
it here.
So this article is going to run the whole of that query.
And then suppose we have we have we have this condition is coming from this other this other this other
item here, we need to pass we need to pass more parameters here.
So we are going to see plus so what it is, is going to do at the end of this year, and that is we
do not close this at the end.
He is going to happen to this other item that we want to do here.
And this item is only going to be applied when the condition has hit.
This situation here in this one is not going to address the parameters.
So limit we are going to do.
Six of these, and then we're going to say limit and we want to limit very remember, you won't want
to get greedy.
You remember when you are doing our codeine in the console, you are saying limit three.
So you want this to limit are adding on by the items and then you want to pass this as a dictionary
so we can see it goes through.
So this one now is complete.
The next thing that we want to do is suppose you see this, what you have written when.
We have landed on our front beach when we have landed on our front page.
What we are telling the system is, first of all, don't for me tell me how many items are in that stable
then this is every time something occasionally does that in when it returns that in the system, they
set the next condition.
This is the count greater than three EPS is going to assign them next.
And previous battles, if not, is just going to pass.
And then after they are done these conditions, it is going to run this query and assign assign this
variable whatever is going to be retained by this.
So the next thing we can do now is what if this page has content?
What if this page we are we had something here, like for instance, we had the last call on make we
what we did like that.
What if we have this page equals page equals five.
This is not going to be found in this situation.
These are not to be found here, but rather it is going to be here.
So we need to handle that case.
So we remove the past.
You know the logic for that, so the first thing you're going to do is to convert it into an integer
because remember this page mostly in Python, it comes as a string.
Every time you set a variable, it comes as a string.
So you need to tell Python, I want to handle this thing as an integer.
So I do Mientkiewicz.
Put vegetables in the garbage and then anything that is written on this one articles, because we can
safely copy this.
Query that we have down here listed here, but this time we are going to have more conditions because
remember, we need to pass we need to pass our we need to pass our PGA, the PGA limit.
Yeah, the PGA.
You remember when we were running bench let exit here and show you this bench, Maria.
Maria Déby and able to go back, yes, you see, when you are doing this, we are passing limit six
and three, so we need to pass this to our system right now.
The code that we have, the code that we have here, if you look closely, this is only having limit
three.
So this is like limit zero and three.
It does not have any other condition.
So here because we have we have pages, we need to take this page and deposit here so that our system
is going to run this query query looking like the one we have here.
So that is what we want to do now.
Now, there is one more thing that you need to note before we can do this, because here, ideally,
the condition is going to be limit.
And then here we're going to report this.
And that said, if you are passing this in here, I don't really give details that we have to pass are
formatted string.
And then here we are going to do page.
And then, um, come on, bridge and then comma, but not that this is supposed to be dynamic, so we
can do something like page by three.
And I'm going to explain why we are having a baby right now and then we also need to do something like
minus three.
So this is the condition that you're going to have here.
Limit Page was read by the ministry.
Now, look at what we had here.
Let me go back here.
I want to go back to the first one and then I get the second one and then I get this one.
Now when you look at this, this is getting close to zero and getting the items.
Look at the second one if we pass the page as page number one.
Or, yeah, I also needed to do limitedly, so if we have if we have here something like limitedly without
this fasta zero, this is going to return the same items that we have here.
But when we pass something here, like every get me from index number three and get me the items, this
is going to jump in that from index number three.
Now this, remember, is page one.
This is page one.
I'm in page two.
Sorry, not which one.
So how this thing works is when we pass on our browser here, we want to get page one.
Page one is going to be passed.
Which one is going to be passed here?
So this is going to be one times three.
One times three, which is three.
And then you need to subtract from that page, because if you pass page, this is page one, page one
times, this is going to be three.
And then if you don't subtract three, you pass, you tend to get from three to three is going to dump
the first three items and is going to get for you from index three to index number six.
But when we do, minus three is going to start from index number index number zero because we have one
times three, which is the minus three.
So zero to three.
Suppose we had to page two is going to be two times three, which is six and then six minus three,
which is three.
So page two is going to have three minus I mean three comma three.
So it's going to return for you that those pages.
So ideally this thing works like this.
This formula is ideally like this.
Get the page number multiplied by the pagination.
This can change.
Remember, if you want five items, this or this will be five.
So you have page multiplied by five minus five.
And then up to the.
This is going to be five.
There is one.
We have three.
Here is because what we are getting our content by three and therefore this formula is constant.
I am going to be putting this to to get Hub so that people can also be able to copy it and reuse.
So then we have passed that item and now the next thing that we need to do here is to check if we have
a next page.
Remember, this one is getting our is getting our articles by the page that we are at.
But then the next thing that we need to add to the system is to know is if I am at page four right now,
do I?
Is there any other page two?
Is there page five?
Is there any data ahead?
So they can also be prepared so that they can also populate the next button?
And I can do that by saying if I'm going to check up on this one, if.
Something like, you know, before, before, before the condition, I have to check whether this data
again next and as it is available, can call it whatever you want.
And then I'm going to copy ideally, I'm going to copy this condition as it is.
Copy that we have next page equals that, and then I do not need to do this minus here.
This will work like that, not only those brackets, so I'm paying a system, get me the current page
and get within the items.
So this is going to be the next page.
Remember, this is the current page.
This is the next page.
Like, for instance, if you're in page two, this is going to be two times the receipts, minus three.
Very angry.
If we want to check whether there is data ahead of that page, we need to get from from number six because
we are getting the items from index number three, from index number three, get the items.
So if I want to know whether there is more data ahead, I'll get from index number six and I try to
get whatever number of items.
So this must not even be anything.
So if there is data here, then this is what I need to check, so if I have a better idea, what what
am I supposed to do?
OK, so if I have data, I'm going to set the previous on the next button and I'm going to do previous
equals minus one.
Remember, the two previous page is I want to get the current picture.
They add and subtract one.
Like if I am if I am at page four, my previous page will be pretty great.
So it's basically four minus one.
My next page is basically page plus one, simple as that.
Then the next thing, if this doesn't have to be the I mean, if I don't have a next page or if the
data here I am at the last page, then what am I supposed to do here?
I'm also going to say the previous and the next page and these are going to be the previous page is
not going to change.
So it will be page minus one, but the next page is going to be zero because there is no next feature.
So it's going to be zero.
And that said, this quote, We are now ready to go ahead and return whatever we have so we can go down
here and do.
Can and remember, here we we did we can just format it like this and then here we are going to return
articles and articles.
It's going to take this up because.
And that one is so big here, and then he also went to return the story.
We are also going to return the previous page and this is going to stick the previous page and then
you're going to return the next page.
And this is going to be next page.
This is not coming up in this column.
And this now summarizes our code then it's been before I say that we have someone else, let us go ahead
and try to test this code using our bench console before we tried even on the browser, because it will
be easier to debug.
So I will go here and buy you.
And nuclear weapons, the console, which console?
And I just pastries could be painful.
And then I'll just call this function is called the Djinnit.
My function is beating it.
And remember, this is taking.
It need not be done or that it's beach meat.
I thought it didn't fit with this function is expecting my DOCTYPE, but see from the way we have eaten
our port, we are passing PAB, so we do not need to pass anymore up here so I can go ahead and pass
article.
Library into a wonderful, wonderful thing.
So.
Here we have an article and our system is returning to items, you see we have the objects here, we
have this one, which is the very test hook.
Then we have this other one, which is the three tested two.
If you come to the database here, let me go back.
And this is not arranged, is not going to help us.
I wish I had this one elsewhere.
If you remember the quote, the queries we read, these are the articles that you are getting.
So we have this one watching.
What if you want to get to pass on the side here?
If I pass one note, is that this one I didn't pass anything.
I didn't pass a page.
And you see, our function is picking up.
The reason why is because by default it is the page was passed as zero.
So what if I pass one note that this one is going also to return the same items?
So the first item here is the there's two.
This is what we have here, because page one by default is what is there is what is used.
What if we pass to here?
Now, note that this idea goes after fifty eight and then we have the 60 and then we have this article.
And also the other thing that that you should note is we have here the previous and the next items.
Just excuse me.
Thank you.
So we have the previous and the next items, when we are at page one, our previous item is zero.
And our next item is to now when we add to the to that we have passed here.
The previous item is one and the next item is three.
So that looks really good if we pass here three, three.
Look at this.
We have the previous two and the next Rs4.
So our code is working fine.
And also you can see also the articles that we have here are the ones that are on page four.
So we can go ahead and take take this quote this dysfunctionally have written it on the EPA note by
fire.
So this quote was OK.
The next thing we're going to do now is to to import this function or this util inside of our inside
of our index file so that we can go ahead and replace this with with the code that we need.
We need we need for.
With the goal that we need, we need to run here.
So what you going to do here is.
We do see from the library, not you, you bought import pigmeat, yes, import.
So this is being imported onto our beach, onto our page.
Excuse me.
If you have questions, let them come.
Give me a second.
Kindly.
Hello, Mummy.
It is great news.
We can have questions only that I'm not able to talk.
Just give me a sec and we can have questions I can hear.
OK, if any one has if you have a question, can you raise.
I think it's straight, there's no question.
But I have a question, by the way, if you put the next and the previous so we can add the last and
first.
Is it possible or.
Yes, you can you can you get those vegetables, you can call them whatever you like to call them money.
OK, and there is in Google, when you search, they put page number, they want to me you can gentlemen
each to each three.
You can click on the page number, you you, I don't know, is next, if you go to the next you go to
next page that you can press fire to jump to page.
They are not obliged to do next the next five times better than.
Up next, I don't get the equation.
I mean, you to show the badge number.
Yeah, wait.
OK, we are on the I mean, in the first page, for example, you will and then we will show the page
one, page one that has three items and.
Now, you will include we didn't see the previous and till now, right?
Yeah, we are coming to the front end.
Yeah, yeah.
Now continue.
We'll see.
Cocaine.
Yes.
Yeah.
Give me give me a couple of seconds here.
Just one is.
So, by the way, there is breaking sometimes the one second this.
Your voice is breaking to make sure that no one is using your.
Your Internet.
Well, my voice is breaking, it's like a fraction of a second.
I don't know if someone in the room using the same Internet
to get them to switch off any device using the same room.
Yeah, I would check about that to make all the bandwidth for you.
Sorry.
So make a full bandwidth for you.
Yes, yes.
Yes.
But we have we have had issues with the with the Internet in Kenya lately, and that is my my provider.
My provider is called Safaricom, so we can proceed.
We will talk about Internet.
Listen to this.
Remember where you are.
You are using this square here to get the gateway to get the articles that we had.
And this one was ideally getting everything.
And that is why you see here we have.
We have all this, so we don't need this square here anymore, so we can just go ahead and comment it
out and then here we are going to do we are going to do our new our new query.
And our new query is going to be to be articles, EQUASS And then when we have articles equals, remember,
we have built our own.
Our own business on business, on library, so now we can do something like business on equals, and
then here we're going to import our pagination to to our beach so that so that it can kick in so we
can do business on equals.
We do need the business that we imported so we can properly compete here.
And then the name of our past, the name of our our to our toothpaste library at the library technological
typewriter.
I think it's a library.
So library this is this is going to be dynamic.
And remember not to pass probably here.
Remember not to do that because already Tab is on the code that we wrote here.
See here.
Is it somewhere inside the this.
Yeah, it's they are, they are here.
So don't pass that, don't pass that here.
And then the next thing that you may need to pass on that that is required is the page that you are
at in the therefore.
We don't have that page, so we can just do page and page.
It.
So we can do page equals, Frappier is going to be Frappé, DOD funded, capital funded dot page.
Remember, this, again, is going to come from we're from whatever it is you remember, this is how
you used to get it.
This is how we used to get it.
So this is how we used to get it from petalled, formed it when I was starting.
I showed you how to get these items in those the last election we did the same.
So Page is going to be that and then we pass that page here.
So ideally this page is going to be passing whatever is is is is on this item here.
And then after we have done that, the next thing is now does the final touches.
What do we need to do is to get to get our.
To get our articles and we can just go ahead and do articles, EQUASS pagination.
Prednisone don't get yes, and then what do you want to get prednisone, remember prednisone, if you
come to the console business on, is this this object that has been returned here?
So Atticus's basically these items here.
So the name of this is Atticus.
So we can go ahead and say pagination, don't get articles.
And then we also need two more things.
We need a previous page and we need a drink.
I would have done that.
And then Creve so we can edit this in this together.
And then I highlight the next one.
And when I do next.
So we have done prev.
Is that next.
Is that then we can go ahead and for more context dictionary.
So copy paste paste and then here again we are going to have forever and here we are going to have next.
And here we have a comma like that.
And also the first one to have a comment like that, great.
So that's it, that's all.
So now if we go to our front page and reload, hopefully we are without this.
Of course, we don't need that for to start that.
We are supposed to see our page with three and excellent using our available articles.
Here are three.
We have only three items.
We have the greatest test of this book, the greatest tool, and then we have reached that.
If I pass here the last question mark.
Let me even try if I if I scroll down.
Available articles.
You see there is one there's only one item here.
Let's see whether that is true from our console here.
If we pass here five that you see, we have only one article on page five.
How about page four?
What if we do here before we are very in the last one as yet another test so we can go to our browser
here in the dofor here, go in, scroll down below our articles.
We have four and the first one is yet another test.
So we have three items on this beach grid.
So the last very last item that we need to do here now is to add the next in the previous buttons here
so that to be able to navigate it from one page to another with the buttons and quickly we will jump
to the front end, which is index indexed index this the email.
Find where that page is.
And I can see mine is this one.
This is why I'm looping through all the articles that have been written and down here, only after this
I can do everything.
I can do it here.
I can do I can do the code here to do that.
So I will just check.
Now, remember that we have also passed other things.
We have passed previous and next and look at previous and next from Arkansas.
We are we have a number, so we have the page number.
So Prev has the previous page and next as the next page number.
So we also we can take them from our index file and see whether we have them in so soon.
We can we can wait and process them.
So what you're going to do here now is.
What do you want to do here now is we are going to write the code that is going to do that so we can
do this is Gingles.
We need brackets here.
And then we see if we have a previous if we have previous, this is bootstrap.
So I'll just use bootstrap.
If it doesn't look so fancy, you can you can use one that you're comfortable with.
So here will see previous page and then this, this link here.
Remember, if we have a previous, this link here is supposed to be the link that we have on the browser,
the link that we have here.
So we can just do this.
Crazyhorse not so I'll do it here.
But remember these for these for it's not supposed to be hardcoded here is supposed to be passed from
from our Python script.
So we can just do not reach express.
We have passed the here and then we can just go ahead and end.
And if I'm going we can copy that.
Same for the next button.
Do that.
And then here we are going to replace this and this in this next.
Then of course this is supposed to read next guess to make it look better.
We can do a class equals button, but on this one we can do informal and informal.
This is bootstrap class equals bottom button and this one we can do success.
So let's see what we have on the front page.
This should this should be.
Now let's go here and check it out.
Reload.
And yes, you see here you have previous and next, let me go back to the homepage and see what we have
on the homepage we don't have previous.
You see that we don't have previous.
We have only next.
So when I click on next.
And by the way, look at when I hope our next look at look at this part down on the corner when I hover
it is page it was two.
So when I click on it, this thing takes me to page two.
You see up here, these are the page two.
And he and I have previous and I have next when I have on previous down here, the left corner, we
have page one and we have on next we have page three and then look at the items.
The items have changed.
So if I click on this again, this goes to page three and we have the items at that page.
And when I hop on the next button here, it goes to page four when I have on previous page to.
Yes.
That is how you do it.
You can make this a little bit more beautiful.
You can add icons, you can add whatever.
But basically in terms of functionality, this button looks very accurate.
So, again, the next button here, I think, is because we don't have full content.
So again, you can make this beautiful depending on depending on what you consider to be good.
So that is what I had for today.
I think it was an intense lesson, but I hope you get the maximum.
Mommy.
OK, thank you.
Thank you.
God, I am so so if you have a question again, this is a prayer for.
I hope for you all.
It's great.
Very good, there is no problem.
Uh, as I said, there is, but and I just I want to get an idea about lust and first.
This is similar to things you can put, for example, next, next, next or last.
So the last thing the fast will be, will be, will be very easy, because the last one here, you just
put it.
You just put there.
Let me see here.
I can just copy this.
Capillaries in
red.
Yeah, this one I just had to go to zero here, pages zero and then I will do.
Yeah, first this of all, Kirsty's being first and then that's so I can do.
I don't know whether we have a button technology on this team reloaded.
First, you see it's going to get to zero, so that's it for now when I click on it, this will go to
the first items and it usually goes to the zoo.
No, it's not zero.
Sorry is one.
It's one.
This is one zero zero.
So let me let me click this.
And then scroll down and click on first.
And in the years this goes to page one, these are the items that we have here, so you can also do
the same for the for the last one year, but not on these subjects, because you need to, first of
all, count the number of items you have in the in the database, then divide by I think we divide by
the number you have.
Getting that number in here, if we come here again, do you need me to get off on?
Yeah, it's clear, it's clear, OK.
Yeah, OK, I got the idea.
I mean, you will put the logic there if you have records found, so you will make your last speech,
the last button to go there last year.
OK, fine.
So if there is no question, we shall close the car today and we meet in Charlotte next Monday.
So the recording will be available after a few minutes.
So back to the agenda.
Karen, can you check that agenda?
Karen.
And.
So I could hear you, but I didn't notice I had stopped sharing.
OK, can you go to the agenda?
Yeah.
Here now can you highlight twenty three then?
Yes.
It is not done.
OK, so so what, what what is left now in the beginning.
Beginning now we have three in the beginning customer reports currencies and the traffic stops.
One of them on Monday will take one of them order.
Yes.
We are going to take one of these on Monday is.
And then if if all goes well by next week, maybe we do have only like two topics that are not not covered.
Which one by end of next week, I don't know.
We are going to select topics here by next week.
We are going to have like one or two topics that are not covered in both a beginner and advanced.
OK, yeah, OK, fine.
So done for today.
Thank you very much, Karani, and thank you for writing this.
So shall we meet next Monday?
Thank you very much.
Thank you.
Bye bye.
Bye.